package org.compiere.model;

import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;

import org.compiere.util.Env;
import org.eevolution.model.I_HR_Employee;
import org.eevolution.model.X_HR_Employee;

public class Mhrmvacationschedule extends X_hrm_vacationschedule {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6340231820555022583L;

	public Mhrmvacationschedule(Properties ctx, int hrm_vacationschedule_ID,
			String trxName) {
		super(ctx, hrm_vacationschedule_ID, trxName);
	}

	public Mhrmvacationschedule(Properties ctx, ResultSet rs, String trxName) {
		super(ctx, rs, trxName);
	}

	/** Load Model for BPartner depending on the department*/
    public X_HR_Employee[] getHR_EmployeeDepartment ()
    {
    	
    	String whereClauseFinal = "ISACTIVE='Y' AND AD_CLIENT_ID=? AND HR_DEPARTMENT_ID=? ";
		List<X_HR_Employee> list = new Query(Env.getCtx(), I_HR_Employee.Table_Name, whereClauseFinal, get_TrxName())
										.setParameters(new Object[]{getAD_Client_ID(), getHR_Department_ID()})
										.setOrderBy("C_BPartner_ID")
										.list();
		return list.toArray(new X_HR_Employee[list.size()]);
    }
	
}
